<?php

//
// +------------------------------------------------------------------------+
// | PHP Version 5.4                                                        |
// +------------------------------------------------------------------------+
// | Copyright (c) All rights reserved.                                     |
// +------------------------------------------------------------------------+
// | 世纪车来车往(北京）网络科技有限公司 版权所有！                               |
// | TEL:010-63732365  HOTLINE:400-6688-365  EMAIL:clcw@clcw.com.cn         |
// | $Revision: 1.0 $                                                       |
// +------------------------------------------------------------------------+
// | Author: liguohua@clcw.com.cn                                        |
// +------------------------------------------------------------------------+
//

namespace AuctionCore\Other;
use AuctionCore\System\AuctionException;

/**
 * 门店列表
 * @author       Eric
 */
class Store {

    public $store = null;
    public $store_pic = null;

    public function __construct(){
         $this->store = M('store');
        $this->store_pic = M('store_pics');
    }
    public function index(){

    }

    //新增门店或门店照片
    public function add($data,$table='store'){
        $data['lasttime'] = date('Y-m-d H:i:s');
        $rs = M($table)->add($data);
        return $rs;
    }

    //更新门店或门店照片
    public function update($data,$map=array(),$table='store'){
        $data['lasttime'] = date('Y-m-d H:i:s');
        $rs = M($table)->where($map)->save($data);
        return $rs;

    }

    //获取门店详情
    public function detail($map=array()){
        return M('store')->where($map)->find();
    }

}
